package cn.jiyun.common.vo;

import lombok.Data;
import lombok.ToString;

/**
 * @Author 李星月
 * @Date: 2023/7/26 17:12
 * @Description : Result
 */
@Data
@ToString
public class Result<T> {
    public String code;
    public String message;
    public T data;

    public static Result success(Object data){
        Result<Object> result = new Result<>();
        result.setCode("1");
        result.setMessage("success");
        result.setData(data);
        return result;
    }
    public static Result error(){
        Result result = new Result<>();
        result.setCode("2");
        result.setMessage("error");
        return result;
    }

}
